﻿using DomainCommons.Models;

namespace EntityModels.E07.Chats
{
    public class Conversation:BaseEntity<int>
    {
        /// <summary>
        /// 参与会话的用户
        /// </summary>
        public List<string> ParticipantIds { get; set; } = new List<string>();
        /// <summary>
        /// 最新的一条消息
        /// </summary>
        public string? LastMessage { get; set; }
        /// <summary>
        /// 最后更新的时间
        /// </summary>
        public DateTime LastUpdated { get; set; }
        /// <summary>
        /// 是否显示
        /// </summary>
        public List<string> DisplayIds { get; set; }
        public Conversation(string id1,string id2)
        {
            ParticipantIds.Add(id1);
            ParticipantIds.Add(id2);
            this.LastUpdated = DateTime.Now;
        }
        public Conversation() { }
    }
}
